#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int n = 0, count = 0;
	for (n = 1; n < 101; n++)
	{
		if (n % 10 == 9 || n / 10 == 9)
			count++;
	}
	printf("%d\n", count);
	return 0;
}